home *** CD-ROM | disk | FTP | other *** search
/ TPUG - Toronto PET Users Group / TPUG Users Group CD / TPUG Users Group CD.iso / AMIGA / AMICUS / AMICUS05.ADF / printer / init.asm < prev    next >
Assembly Source File  |  1986-01-15  |  3KB  |  108 lines

  1.  
  2. /* printer device - init.asm AmigaLink 1/25/86 */
  3. **********************************************************************
  4. *                                            *
  5. *   Copyright 1985, Commodore-Amiga Inc.   All rights reserved.       *
  6. *   No part of this program may be reproduced, transmitted,      *
  7. *   transcribed, stored in retrieval system, or translated into       *
  8. *   any language or computer language, in any form or by any          *
  9. *   means, electronic, mechanical, magnetic, optical, chemical,       *
  10. *   manual or otherwise, without the prior written permission of     *
  11. *   Commodore-Amiga Incorporated, 983 University Ave. Building #D,   *
  12. *   Los Gatos, California, 95030                       *
  13. *                                            *
  14. **********************************************************************
  15. *
  16. *    printer device functions
  17. *
  18. **********************************************************************
  19.  
  20.      SECTION        printer
  21.  
  22. *------ Included Files -----------------------------------------------
  23.  
  24.      INCLUDE        "exec/types.i"
  25.      INCLUDE        "exec/nodes.i"
  26.      INCLUDE        "exec/lists.i"
  27.      INCLUDE        "exec/memory.i"
  28.      INCLUDE        "exec/ports.i"
  29.      INCLUDE        "exec/libraries.i"
  30.  
  31.      INCLUDE        "macros.i"
  32.  
  33. *------ Imported Functions -------------------------------------------
  34.  
  35.      XREF_EXE  CloseLibrary
  36.      XREF_EXE  OpenLibrary
  37.      XREF      _AbsExecBase
  38.  
  39.  
  40.      XREF      _PEDData
  41.  
  42.  
  43. *------ Exported Globals ---------------------------------------------
  44.  
  45.      XDEF      _Init
  46.      XDEF      _Expunge
  47.      XDEF      _Open
  48.      XDEF      _Close
  49.      XDEF      _PD
  50.      XDEF      _PED
  51.      XDEF      _SysBase
  52.      XDEF      _GfxBase
  53.  
  54.  
  55. **********************************************************************
  56.      SECTION        printer,DATA
  57. _PD       DC.L 0
  58. _PED      DC.L 0
  59. _SysBase  DC.L 0
  60. _GfxBase  DC.L 0
  61.  
  62.  
  63. **********************************************************************
  64.      SECTION        printer,CODE
  65. _Init:
  66.           MOVE.L    4(A7),_PD
  67.           LEA  _PEDData(PC),A0
  68.           MOVE.L    A0,_PED
  69.           MOVE.L    A6,-(A7)
  70.           MOVE.L    _AbsExecBase,A6
  71.           MOVE.L    A6,_SysBase
  72.  
  73. *        ;------ open the graphics library
  74.           LEA  GLName(PC),A1
  75.           MOVEQ     #0,D0
  76.           CALLEXE OpenLibrary
  77.           MOVE.L    D0,_GfxBase
  78.           BEQ  initGLErr
  79.  
  80.           MOVEQ     #0,D0
  81. pdiRts:
  82.           MOVE.L    (A7)+,A6
  83.           RTS
  84.  
  85. initGLErr:
  86.           MOVEQ     #-1,D0
  87.           BRA.S     pdiRts
  88.  
  89. GLName:
  90.           DC.B 'graphics.library'
  91.           DC.B 0
  92.           DS.W 0
  93.  
  94.  
  95. *---------------------------------------------------------------------
  96. _Expunge:
  97.           MOVE.L    _GfxBase,A1
  98.           LINKEXE   CloseLibrary
  99.  
  100.  
  101. *---------------------------------------------------------------------
  102. _Open:
  103. _Close:
  104.           MOVEQ     #0,D0
  105.           RTS
  106.  
  107.           END
  108.